<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="keywords" content="松滋人民政府,松滋市政府,市人民政府,市政府公众信息网" />
    <meta name="description" content="松滋市人民政府,松滋市人民政府,市人民政府，市政府公众信息网" />
    <meta name="SiteName" content="松滋市人民政府门户网站" />
    <meta name="SiteDomain" content="www.hbsz.gov.cn" />
    <meta name="SiteIDCode" content="4210870047" />
    <title>松滋市人民政府网</title>
    <link rel="shortcut icon" type="image/x-icon" href="http://static.hbsz.gov.cn:8788/css/favicon.ico" media=" screen"
        ignoreapd="true" />
    <link rel="stylesheet" href="http://static.hbsz.gov.cn:8788/css/element.css" ignoreapd="true" />
    <link href="http://static.hbsz.gov.cn:8788/css/home.css" rel="stylesheet" type="text/css" ignoreapd="true" />
    <script type="text/javascript" src="http://static.hbsz.gov.cn:8788/script/jquery-3.3.1.min.js"
        ignoreapd="true"></script>
    <script type="text/javascript" src="http://static.hbsz.gov.cn:8788/script/axios.min.js" ignoreapd="true"></script>
    <style>
        body {
            background: url(http://static.hbsz.gov.cn:8788/images/di15.png) no-repeat;
        }

        .logo {
            height: 190px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        .section {
            width: 1200px;
            margin-left: auto;
            margin-right: auto;
        }

        .search-group {
            height: 50px;
            margin-top: 30px;
            display: flex;
            /* justify-content: center; */
            justify-content: space-around;
            width: 1200px;
        }

        .search-group>.el-input,
        .search-group input {
            height: 50px;
            width: 250px;
        }

        .search-group>.el-input {
            margin-right: 5px;
        }

        .el-button.orange {
            background-image: linear-gradient(0deg, #ff723a 0%, #ffb597 100%);
            color: white;
            font-size: 14px;
            width: 140px !important;
        }

        .el-button.blue {
            background-image: linear-gradient(0deg, #1d8cff 0%, #4dccf6 100%);
            color: white;
            font-size: 14px;
        }

        .wssq {
            background-color: white;
            min-height: 500px;
            padding: 20px;
            padding-bottom: 70px;
            position: relative;
        }

        .wssq .location {
            display: flex;
            align-items: center;
            height: 50px;
            border-bottom: #dedede 1px solid;
        }

        .wssq-title {
            background: #f1f2f3;
            line-height: 50px;
            text-align: center;
            color: #233e5f;
            font-size: 16px;
            font-weight: bold;
            margin-top: 40px;
        }

        .wssq-title+.el-row {
            margin-top: 10px;
            border-left: 1px solid #eeeeee;
            border-top: 1px solid #eeeeee;
        }

        .wssq-title+.el-row .el-col.th {
            background-color: #f3f7fa;
            color: #333333;
            font-size: 15px;
            font-weight: bold;
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 50px;
            border-right: 1px solid #eeeeee;
            border-bottom: 1px solid #eeeeee;
        }

        .wssq-title+.el-row .el-col.td {
            min-height: 50px;
            padding: 0 40px;
            color: #45484b;
            display: flex;
            font-size: 14px;
            align-items: center;
            border-right: 1px solid #eeeeee;
            border-bottom: 1px solid #eeeeee;
            line-height: 2;
            word-break: break-all;
        }

        .wssq-title+.el-row .el-col.td.content {
            padding: 15px 40px;
        }

        .el-icon-circle-close {
            color: white;
        }

        a.active {
            color: #00b8ee !important;
        }

        .el-image+.el-image {
            margin-left: 20px;
        }
    </style>
</head>

<body>
    <div class="logo section">
        <img src="http://static.hbsz.gov.cn:8788/images/title-yshj.png" ignoreapd="true" />
        <span style="margin-top: 10px; color: #fff">（ 民意速办服务平台 ）</span>
    </div>

    <div class="section wssq">
        <div class="location">
            <img src="http://static.hbsz.gov.cn:8788/images/home.png" ignoreapd="true" style="margin-right: 8px" />
            <div aria-label="Breadcrumb" role="navigation" class="el-breadcrumb">
                <span class="el-breadcrumb__item"><span role="link" class="el-breadcrumb__inner"><a
                            href="http://www.hbsz.gov.cn/" class="nuxt-link-active">首页</a></span><span
                        role="presentation" class="el-breadcrumb__separator">/</span></span>
                <span class="el-breadcrumb__item" aria-current="page"><span role="link"
                        class="el-breadcrumb__inner">查询诉求</span><span role="presentation"
                        class="el-breadcrumb__separator">/</span></span>
            </div>
        </div>

        <div class="search-group section">
            <div style="display: flex">
                <div style="display: flex; align-items: center">
                    <div class="el-form-item__label-wrap" style="margin-left: 11px">
                        <label class="el-form-item__label" style="width: auto">民意编号</label>
                    </div>
                    <div class="el-form-item__content">
                        <div class="el-input">
                            <input type="text" id="PublicOpinionCode" autocomplete="off" placeholder="请输入工单编号"
                                class="el-input__inner" value="" />
                        </div>
                    </div>
                </div>

                <div style="display: flex; align-items: center">
                    <div class="el-form-item__label-wrap" style="margin-left: 11px">
                        <label class="el-form-item__label" style="width: auto">查询密码</label>
                    </div>
                    <div class="el-form-item__content">
                        <div class="el-input">
                            <input type="text" id="QueryPassword" autocomplete="off" placeholder="请输入查询密码"
                                class="el-input__inner" value="" />
                        </div>
                    </div>
                </div>
            </div>

            <div>
                <button type="button" id="search" class="el-button blue el-button--default"><span>查询</span></button>
            </div>
        </div>

        <div id="allActionContainer" style="display: none"></div>
    </div>

    <div role="alert" class="el-notification right" style="top: 16px; z-index: 2012; display: none">
        <img style="width: 24px; height: 24px; display: none"
            src=""
            alt="" />
        <div class="el-notification__group is-with-icon">
            <h2 class="el-notification__title">提示</h2>
            <div class="el-notification__content">
                <p>请输入联系电话！</p>
            </div>
            <div id="close" class="el-notification__closeBtn">X</div>
        </div>
    </div>

    <div id="imagePreview">
        <span class="closeButton" id="closeButton">X</span>
        <img id="previewImg" src="" alt="Preview Image" />
    </div>

    <script>
        $(() => {
            formData = {
                PublicOpinionCode: "",
                QueryPassword: "",
            };

            // 其他视图相关效果

            // 定时器
            let timer;

            // 打开提示框
            function message(msg, time) {
                time = time || 2000;
                clearTimeout(timer);
                $(".el-notification__content p").text(msg);
                $(".el-notification").show();
                timer = setTimeout(() => {
                    $(".el-notification").hide();
                }, 2000);
            }

            let authToken = "";

            // 获取token
            function getToken() {
                axios.get("http://minyisubanarmtest.gl-ns.com/api/public/token").then(function (response) {
                    authToken = response.data;
                });
            }
            getToken();

            // 解析日期字符串 输出固定格式
            function formatDate(dateString) {
                // 解析日期字符串
                const date = new Date(dateString);
                // 获取年份
                const year = date.getFullYear();
                // 获取月份（注意：月份是从0开始的，所以+1）
                const month = String(date.getMonth() + 1).padStart(2, "0");
                // 获取日期
                const day = String(date.getDate()).padStart(2, "0");
                // 获取小时和分钟
                const hours = String(date.getHours()).padStart(2, "0");
                const minutes = String(date.getMinutes()).padStart(2, "0");
                // 格式化日期字符串
                const formattedDate = `${year}/${month}.${day} ${hours}:${minutes}`;
                return formattedDate;
            }

            function maskPhoneNumber(phoneNumber) {
                if (!phoneNumber) {
                    return '';
                }

                const prefixLength = 3;
                const suffixLength = 4;
                const maskedPart = '*'.repeat(phoneNumber.length - prefixLength - suffixLength);

                return phoneNumber.substring(0, prefixLength) + maskedPart + phoneNumber.substring(phoneNumber.length - suffixLength);
            }

            function maskName(str, maskChar = '*') {
                if (!str) {
                    return '';
                }

                if (str.length === 2) {
                    // 对于两个字的名字，保留第一个字，第二个字用星号代替
                    return str.charAt(0) + maskChar;
                } else if (str.length > 2) {
                    // 对于三个及以上字的名字，保留首尾各一个字符，中间用星号代替
                    const prefixLength = 1;
                    const suffixLength = 1;
                    const maskedPart = maskChar.repeat(str.length - prefixLength - suffixLength);
                    return str.substring(0, prefixLength) + maskedPart + str.substring(str.length - suffixLength);
                } else {
                    // 对于单个字的名字，直接返回原字符串
                    return str;
                }
            }

            function getImgRemoteUrl(url, baseurl = "") {
                if (!url) return "";
                const arr = url.split("/");

                let server = "";

                if (url.includes("minyisuban")) {
                    server = "common";
                }
                if (url.includes("minyisubancms")) {
                    server = "commoncms";
                }
                if (!server) return url;

                return baseurl + `/image/${server}/` + arr[arr.length - 1];
            }

            function previewImg(imageSrc, index) {
                console.log(imageSrc, index);

                const previewImg = document.getElementById("previewImg");
                previewImg.src = getImgRemoteUrl(imageSrc, "http://minyisubanarmtest.gl-ns.com");

                const imagePreview = document.getElementById("imagePreview");
                imagePreview.style.display = "block";
            }

            // 关闭预览函数
            function closePreview() {
                const imagePreview = document.getElementById("imagePreview");
                imagePreview.style.display = "none";
            }

            // 点击预览框外部隐藏预览框
            document.getElementById("closeButton").addEventListener("click", function () {
                const imagePreview = document.getElementById("imagePreview");
                imagePreview.style.display = "none";
            });

            const workOrderStatusEnum = {
                1: "提交民意",
                2: "直接回复",
                3: "对民意进行审核",
                4: "处理并派单",
                5: "处理并改派",
                6: "审核并进行结果汇总",
                16: "处理并派单",
                22: '处理并重派'
            };

            const handleActionsEnum = {
                1: "提交",
                2: "直接回复",
                3: "初审",
                4: "处理并派单",
                5: "处理并改派",
                6: "审核",
                7: "回访",
                8: "生成工单",
                9: "签收工单",
                10: "处理工单",
                11: "部门申请延时",
                12: "审核延时",
                13: "部门退回",
                14: "退回被驳回",
                15: "审核工单",
                16: "处理并派单",
                17: "操作相似民意关联",
                18: "被关联",
                19: "审核关联",
                20: "民意延期",
                21: "提交疑难办件",
            };

            var workerList = []

            // 查询
            async function search() {
                getViewData();

                let { PublicOpinionCode, QueryPassword } = formData;
                if (PublicOpinionCode && QueryPassword) {
                    await axios({
                        method: "get",
                        url: "http://minyisubanarmtest.gl-ns.com/api/PublicOpinionQuickFixSystem/public/Detail/weixin/code",
                        headers: {
                            // 设置请求头
                            Token: authToken,
                        },
                        params: {
                            PublicOpinionCode: PublicOpinionCode,
                            QueryPassword: QueryPassword,
                        },
                    })
                        .then((response) => {
                            message("查询中。。。");

                            const allActionContainer = document.getElementById("allActionContainer");

                            while (allActionContainer.firstChild) {
                                allActionContainer.removeChild(allActionContainer.firstChild);
                            }

                            setTimeout(() => {
                                document.getElementById("allActionContainer").style.display = "block";
                                message("查询成功!");
                            }, 1500);

                            if (response.data.line) {
                                const allAction = response.data.line.map(function (item) {
                                    return {
                                        actionTime: item.actionTime,
                                        userName: item.userName,
                                        handleActions: item.handleActions,
                                        workDetail: item.workDetail,
                                        detail: item.detail,
                                        replyContent: item.replyContent,
                                    };
                                });

                                allAction.forEach((item, index) => {
                                    const allActionContainer = document.createElement("div");

                                    allActionContainer.classList.add("minyisuban-title");

                                    const timeSpan = document.createElement("span");
                                    timeSpan.classList.add("time");
                                    timeSpan.textContent = formatDate(item.actionTime);
                                    allActionContainer.appendChild(timeSpan);

                                    const nameSpan = document.createElement("span");
                                    nameSpan.classList.add("name");
                                    nameSpan.textContent = (index === 0 ? item.userName : (item.handleActions === 16 ? "用户" : "中心"));
                                    // nameSpan.textContent = index === 0 ? item.userName : "中心"
                                    allActionContainer.appendChild(nameSpan);

                                    const handleActionsSpan = document.createElement("span");
                                    handleActionsSpan.classList.add("handleActionsSpan");
                                    handleActionsSpan.textContent = item.handleActions === 16 ? '给出不满意评价' : workOrderStatusEnum[item.handleActions];
                                    allActionContainer.appendChild(handleActionsSpan);

                                    document.querySelector("#allActionContainer").appendChild(allActionContainer);

                                    if (item.handleActions == 1) {
                                        const minyisubanContent = document.createElement("div");
                                        minyisubanContent.classList.add("minyisuban-content");

                                        const shouhangDiv = document.createElement("div");
                                        shouhangDiv.classList.add("shouhang");

                                        const serviceDiv = document.createElement("div");
                                        const serviceSpan = document.createElement("span");
                                        serviceSpan.id = "serviceTarget";

                                        serviceSpan.textContent = maskName(response.data.detail.serviceTarget);
                                        serviceDiv.textContent = "服务对象：";
                                        serviceDiv.appendChild(serviceSpan);

                                        const phoneDiv = document.createElement("div");
                                        const phoneSpan = document.createElement("span");
                                        phoneSpan.id = "phoneNumber";
                                        phoneSpan.textContent = maskPhoneNumber(response.data.detail.phoneNumber);
                                        phoneDiv.textContent = "联系电话：";
                                        phoneDiv.appendChild(phoneSpan);

                                        shouhangDiv.appendChild(serviceDiv);
                                        shouhangDiv.appendChild(phoneDiv);

                                        minyisubanContent.appendChild(shouhangDiv);

                                        // const TitleContent = document.createElement("div");
                                        // const TitleSpan = document.createElement("span");
                                        // phoneSpan.id = "title";
                                        // TitleSpan.textContent = response.data.detail.title;
                                        // TitleContent.textContent = "诉求标题：";
                                        // TitleContent.appendChild(TitleSpan);

                                        // minyisubanContent.appendChild(TitleContent);

                                        const contentDiv = document.createElement("div"); // 述求内容：
                                        const contentSpan = document.createElement("span"); // contentSpan.innerText = '述求内容：';
                                        contentSpan.textContent = "诉求内容：";
                                        contentSpan.style.width = "80px";
                                        contentSpan.style.display = "inline-block";
                                        contentDiv.appendChild(contentSpan);

                                        const contentDiv2 = document.createElement("div");
                                        const contentSpan2 = document.createElement("span");
                                        contentSpan2.textContent = response.data.detail.content;
                                        contentSpan2.style.width = "530px";
                                        contentSpan2.style.display = "inline-block";
                                        contentSpan2.style.wordBreak = "break-all";
                                        contentDiv2.appendChild(contentSpan2);

                                        const flexContent = document.createElement("div"); // 创建一个flex容器
                                        flexContent.style.display = "flex";

                                        minyisubanContent.appendChild(flexContent); // 添加到父容器中

                                        minyisubanContent.appendChild(contentDiv);

                                        flexContent.appendChild(contentDiv);

                                        flexContent.appendChild(contentDiv2);

                                        // ---

                                        const flexImage = document.createElement("div"); // 创建一个flex容器
                                        flexImage.style.display = "flex";

                                        minyisubanContent.appendChild(flexImage); // 添加到父容器中

                                        const imgdivDiv = document.createElement("div");
                                        imgdivDiv.classList.add("imgdiv");

                                        const textSpan = document.createElement("span");
                                        textSpan.textContent = "图 片：";

                                        imgdivDiv.appendChild(textSpan);

                                        if (!response.data.detail.images.length && response.data.detail.images.length > 0) {
                                            minyisubanContent.appendChild(imgdivDiv);
                                        }
                                        
                                        
                                        // const wuSpan = document.createElement("span");
                                        // wuSpan.id = "wu";
                                        // wuSpan.style.display = "none";
                                        // wuSpan.textContent = "无";

                                        // if (!response.data.detail.images.length && response.data.detail.images.length == 0) {
                                        //     wuSpan.style.display = "inline";
                                        // }

                                        const imageContainerDiv = document.createElement("div");
                                        imageContainerDiv.id = "imageContainer";

                                        if (!response.data.detail.images.length && response.data.detail.images.length > 0) {
                                            flexImage.appendChild(imgdivDiv); // 第一个
                                        }
                                        

                                        // imgdivDiv.appendChild(wuSpan);
                                        imgdivDiv.appendChild(imageContainerDiv);

                                        const item = response.data.detail.images.forEach(function (item, index) {
                                            const imageElement = document.createElement("img");
                                            imageElement.setAttribute("src", getImgRemoteUrl(item, "http://minyisubanarmtest.gl-ns.com"));
                                            imageElement.style.width = "167px";
                                            imageElement.style.height = "125px";
                                            imageElement.style.marginTop = "9px";
                                            imageElement.style.marginRight = "9px";
                                            imageElement.style.objectFit = "cover";
                                            imageElement.style.boxShadow = "2px 2px 5px 0px #e7e7e7;";
                                            imageElement.addEventListener("click", () => previewImg(item, index));
                                            imageContainerDiv.appendChild(imageElement);
                                        }); 

                                        minyisubanContent.appendChild(imageContainerDiv);
                                    
                                        

                                        flexImage.appendChild(imageContainerDiv); // 第二个

                                        const addressDiv = document.createElement("div");

                                        const textSpan1 = document.createElement("span");
                                        textSpan1.textContent = "具体地址：";

                                        const specificAddressSpan = document.createElement("span");
                                        specificAddressSpan.id = "specificAddress";
                                        specificAddressSpan.textContent = response.data.detail.specificAddress;

                                        addressDiv.appendChild(textSpan1);
                                        addressDiv.appendChild(specificAddressSpan);

                                        minyisubanContent.appendChild(addressDiv);

                                        document.querySelector("#allActionContainer").appendChild(minyisubanContent);
                                    }

                                    const disposeWork = document.createElement("div");
                                    disposeWork.classList.add("dispose-work");

                                    
                                    if (item.handleActions == 4 || item.handleActions == 5 || item.handleActions == 22) {
                                        item.workDetail.forEach((it, itIndex) => {
                                            if (itIndex > 0) {
                                                const hrElement = document.createElement("hr");
                                                disposeWork.appendChild(hrElement);
                                            }


                                            workerList.push(it);

                                            const paidanDiv = document.createElement("div");
                                            paidanDiv.classList.add("paidan", "context-box");

                                            it.details.forEach((dt) => {
                                                const paidanItemDiv = document.createElement("div");

                                                paidanItemDiv.classList.add("paidan-item");

                                                // const ptimeSpan = document.createElement("span");
                                                // ptimeSpan.classList.add("ptime");
                                                // ptimeSpan.textContent = formatDate(dt.date);

                                                const pactiveSpan = document.createElement("span");
                                                pactiveSpan.classList.add("pactive");

                                                pactiveSpan.textContent = dt.unitName + " " + '正在处理';

                                                // paidanItemDiv.appendChild(ptimeSpan);
                                                paidanItemDiv.appendChild(pactiveSpan);

                                                if (dt.handleActions === 10) {
                                                    paidanDiv.appendChild(paidanItemDiv);
                                                }
                                            });

                                            disposeWork.appendChild(paidanDiv);
                                        });

                                        document.querySelector("#allActionContainer").appendChild(disposeWork);
                                    }

                                    if (item.handleActions == 2) {
                                        const resultContainer = document.createElement("div");
                                        resultContainer.classList.add("result", "context-box");

                                        const ReplyDiv = document.createElement("div");
                                        const ReplySpan = document.createElement("span");
                                        ReplySpan.textContent = "答复内容：";
                                        ReplyDiv.appendChild(ReplySpan);

                                        const ReplyContent = document.createElement("span");
                                        ReplyContent.textContent = item.replyContent || "无";
                                        ReplyDiv.appendChild(ReplyContent);
                                        resultContainer.appendChild(ReplyDiv);
                                    }

                                    const resultContainer = document.createElement('div'); // 已删除
                                    resultContainer.classList.add('result', 'context-box');

                                    if ([16].includes(item.handleActions)) {

                                        const allActionContainer = document.createElement("div");
                                        allActionContainer.classList.add("minyisuban-title");

                                        const timeSpan = document.createElement("span");
                                        timeSpan.classList.add("time");
                                        timeSpan.textContent = formatDate(item.actionTime);
                                        allActionContainer.appendChild(timeSpan);

                                        const nameSpan = document.createElement("span");
                                        nameSpan.classList.add("name");
                                        nameSpan.textContent = '中心'
                                        allActionContainer.appendChild(nameSpan);

                                        const handleActionsSpan = document.createElement("span");
                                        handleActionsSpan.classList.add("handleActionsSpan");
                                        handleActionsSpan.textContent = handleActionsEnum[item.handleActions];
                                        allActionContainer.appendChild(handleActionsSpan);

                                        document.querySelector("#allActionContainer").appendChild(allActionContainer);

                                        const disposeWork = document.createElement("div");
                                        disposeWork.classList.add("dispose-work");

                                        const paidanDiv = document.createElement("div");
                                        paidanDiv.classList.add("paidan", "context-box");

                                        const paidanItemDiv = document.createElement("div");
                                        paidanItemDiv.classList.add("paidan-item");

                                        // const ptimeSpan = document.createElement("span");
                                        // ptimeSpan.classList.add("ptime");
                                        // ptimeSpan.textContent = formatDate( new Date() );

                                        const pactiveSpan = document.createElement("span");
                                        pactiveSpan.classList.add("pactive");

                                        workerList.forEach((dt) => {
                                            if(dt.workOrderStatus == 6){
                                                pactiveSpan.textContent = dt.details[0].unitName + " " + '处理完成'
                                            } else {
                                                pactiveSpan.textContent = dt.details[0].unitName + " " + '正在处理'
                                            }
                                        })

                                        paidanItemDiv.appendChild(pactiveSpan);

                                        paidanDiv.appendChild(paidanItemDiv);

                                        disposeWork.appendChild(paidanDiv);

                                        document.querySelector("#allActionContainer").appendChild(disposeWork);

                                    }

                                    if (item.handleActions == 6) {
                                        const resultContainer = document.createElement("div");
                                        resultContainer.classList.add("result", "context-box");

                                        const summaryDiv = document.createElement("div");
                                        const summarySpan = document.createElement("span");
                                        summarySpan.textContent = "结果汇总：";
                                        summaryDiv.appendChild(summarySpan);

                                        const replyContent = document.createElement("span");
                                        replyContent.textContent = item.detail?.replyContent || "无";
                                        summaryDiv.appendChild(replyContent);
                                        resultContainer.appendChild(summaryDiv);

                                        const imgDiv = document.createElement("div");
                                        const imgSpan = document.createElement("span");

                                        imgSpan.textContent = "图 片：";
                                        imgDiv.appendChild(imgSpan);

                                        // const wuIamges = document.createElement("span");
                                        // wuIamges.id = "wu";
                                        // wuIamges.style.display = "none";
                                        // wuIamges.textContent = "无";

                                        if (!item.detail?.attachmentPath.length && item.detail?.attachmentPath.length == 0) {
                                            // wuIamges.style.display = "";
                                            imgDiv.style.display = "none";
                                        }

                                        const flexImage2 = document.createElement("div"); // 创建一个flex容器
                                        flexImage2.style.display = "flex";

                                        resultContainer.appendChild(flexImage2); // 添加到父容器中

                                        
                                        flexImage2.appendChild(imgDiv)
                                        

                                        const imgCount = document.createElement("div");
                                        imgCount.id = "imageContainer";

                                        item.detail.attachmentPath.forEach(function (item, index) {
                                            const imageItem = document.createElement("img");
                                            imageItem.setAttribute("src", getImgRemoteUrl(item, "http://minyisubanarmtest.gl-ns.com"));
                                            imageItem.style.width = "167px";
                                            imageItem.style.height = "125px";
                                            imageItem.style.marginTop = "9px";
                                            imageItem.style.marginRight = "9px";
                                            imageItem.style.objectFit = "cover";
                                            imageItem.style.boxShadow = "2px 2px 5px 0px #e7e7e7;";
                                            imageItem.addEventListener("click", () => previewImg(item, index));
                                            imgCount.appendChild(imageItem);
                                        });

                                        resultContainer.appendChild(imgCount);

                                        flexImage2.appendChild(imgCount);

                                        if (!item.detail?.attachmentPath.length && item.detail?.attachmentPath.length > 0) {

                                            resultContainer.appendChild(imgDiv);

                                        }

                                        document.querySelector("#allActionContainer").appendChild(resultContainer);
                                    }
                                });
                            }
                        })
                        .catch((err) => {
                            document.getElementById("allActionContainer").style.display = "none";
                            message("查询失败!");
                        });
                } else {
                    message("请输入完整信息!");
                }
            }

            // 获取视图中的数据赋值
            function getViewData() {
                Object.keys(formData).forEach((key) => {
                    let selector = "#" + key;
                    if ($(selector).length) {
                        formData[key] = $(selector).val();
                    }
                });
            }

            // 点击事件绑定
            $("#search").click(search);
        });
    </script>

    <style>
        .minyisuban-title {
            background-image: linear-gradient(93deg, rgba(79, 172, 254, 0.2), #fff);
            height: 60px;
            line-height: 60px;
            margin: 30px 0;
        }

        .minyisuban-title span {
            color: #333;
            font-size: 18px;
        }

        .minyisuban-title .time {
            color: #1968e0;
            padding: 0 39px 0 30px;
        }

        .minyisuban-title .name {
            font-weight: 700;
            padding-right: 10px;
        }

        .minyisuban-content {
            color: #333;
            font-size: 16px;
            line-height: 35px;
            margin: 0 auto;
            width: 608px;
        }

        .minyisuban-content .shouhang {
            display: flex;
            justify-content: space-between;
        }

        .minyisuban-content .imgdiv span {
            display: inline-block;
            width: 80px;
            word-spacing: 27px;
        }

        /* 预览框样式 */
        #imagePreview {
            display: none;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 9999;
            background-color: #fff;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
            padding: 40px;
        }

        #previewImg {
            max-width: 80vw;
            max-height: 80vh;
        }

        .closeButton {
            position: absolute;
            top: 5px;
            right: 5px;
            cursor: pointer;
            color: #333;

            font-size: 36px;
        }

        .context-box {
            width: 608px;
            margin: 0 auto;
            line-height: 35px;
            font-size: 16px;
            color: #333333;
        }

        .context-box span {
            color: #666;
        }

        .paidan .ptime {
            color: #1968e0;
            margin-right: 45px;
        }

        .paidan .pactive {
            color: #333333;
        }

        .result span {
            display: inline-block;
            /* width: 80px; */
            word-spacing: 27px;
        }

        hr {
            width: 68%;
            border: 0;
            border-top: 1px dashed #bfbfbf;
        }
    </style>

    <TRS_TEMPLATE TEMPNAME="嵌套_尾部_公用友情链接">页面底部友情链接嵌套模板</TRS_TEMPLATE>
    <TRS_TEMPLATE TEMPNAME="嵌套_尾部_通用">页面底部部嵌套模板</TRS_TEMPLATE>
</body>

</html>